package com.example.wang.activitytest;

import android.app.Activity;
import android.app.AppComponentFactory;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.RequiresApi;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;

@RequiresApi(api = Build.VERSION_CODES.P)
public class BaseActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        Log.d("BaseActivity",getClass().getSimpleName());
        ActivityCollector.addActivity(this);

    }
    @Override
    protected  void  onDestroy(){
        super.onDestroy();
        ActivityCollector.removeActivity(this);
    }
}
